package com.gsm.controller;

import com.gsm.entity.Result;
import com.gsm.entity.SysUser;
import com.gsm.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("login")
public class LoginController {
    @Autowired
    private SysUserService sysUserService;

    /**
     * 根据 账号密码 登录
     */
    @PostMapping("/auth")
    public Result selectSysUserByAccountAndPwd(@RequestBody SysUser sysUser) {
        Result result = sysUserService.selectSysUserByAccountAndPwd(sysUser);
        return result;
    }
}
